package com.luo.chengrui.module.sa.enums;


import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * sa 协同平台 系统管理
 * <p>
 * sa 系统，使用 2-001-000-000 段
 */
public interface ErrorCodeConstants {

    // ==========  协同平台 系统管理 模块 2001000001 ==========
    ErrorCode COMMON_ERROR = new ErrorCode(2001000001, "系统异常");

    // ==========  系统管理  2002000000============
    ErrorCode ORG_NOT_EXISTS = new ErrorCode(2002000001, "机构不存在");
    ErrorCode ORG_PARENT_NOT_SYNC = new ErrorCode(2002000002, "未获取到上级机构dept_id，请先同步上级机构");
    ErrorCode ORG_PARENT_NOT_EXISTS = new ErrorCode(2002000003, "人员同步至system_user时失败，未获取到人员上级机构");
    ErrorCode ORG_IS_DISABLED = new ErrorCode(2002000004, "组织已经被禁用");

    ErrorCode POSITION_NOT_EXISTS = new ErrorCode(2003000001, "岗位不存在");

    ErrorCode PERSON_NOT_EXISTS = new ErrorCode(2004000001, "人员不存在");
    ErrorCode PERSON_CODE_EXISTS = new ErrorCode(2004000002, "人员编码已存在");
    ErrorCode PERSON_LOGIN_NAME_EXISTS = new ErrorCode(2004000003, "人员登录名已存在");

    ErrorCode COMMON_TREE_NOT_EXISTS = new ErrorCode(2005000001, "树节点不存在");
    ErrorCode COMMON_TREE_CODE_EXISTS = new ErrorCode(2005000002, "编号重复");
    ErrorCode COMMON_TREE_NAME_EXISTS = new ErrorCode(2005000003, "名称重复");
    ErrorCode COMMON_TREE_PARENT_IS_NOT_NULL = new ErrorCode(2005000004, "父节点ID不能为空");
    ErrorCode COMMON_TREE_PARENT_IS_NOT_VALIDE = new ErrorCode(2005000005, "父节点ID不合法");
    ErrorCode COMMON_TREE_PARENT_PARENT_ERROR = new ErrorCode(1002004005, "不能设置自己为父节点");

    ErrorCode ROLE_NOT_EXISTS = new ErrorCode(2006000001, "角色不存在");
    ErrorCode ROLE_FOLDER_MODULE_NOT_EXISTS = new ErrorCode(2006000002, "角色分类模块配置项不存在");
    ErrorCode ROLE_FOLDER_USER_NOT_EXISTS = new ErrorCode(2006000003, "角色分类人员配置项不存在");


    ErrorCode AUTHORIZE_NOT_EXISTS = new ErrorCode(2007000001, "授权不存在");
    ErrorCode AUTHORIZE_ORG_OR_ROLE_IS_NOT_NULL = new ErrorCode(2007000001, "机构路径ID和角色ID不能为空");


    ErrorCode DATA_PERMISSION_DEFINE_NOT_EXISTS = new ErrorCode(2008000001, "数据权限定义 项不存在");
    ErrorCode DATA_PERMISSION_DEFINE_TABLE_NAME_EXISTS = new ErrorCode(2008000002, "数据表已经存在");
    ErrorCode DATA_PERMISSION_ITEM_NOT_EXISTS = new ErrorCode(2008000003, "数据权限项不存在");
    ErrorCode DATA_PERMISSION_ITEM_CODE_EXISTS = new ErrorCode(2008000004, "编码已经存在");
    ErrorCode DATA_PERMISSION_ITEM_SUB_NOT_EXISTS = new ErrorCode(2008000005, "权限项明细不存在");
    ErrorCode DATA_PERMISSION_ITEM_SUB_CODE_NOT_EXISTS = new ErrorCode(2008000006, "权限项明细编码不能为空");
    ErrorCode DATA_PERMISSION_ITEM_SUB_CODE_EXISTS = new ErrorCode(2008000007, "编码已经存在");


    ErrorCode DATA_PERMISSION_CONFIG_NOT_EXISTS = new ErrorCode(2009000001, "权限配置项不存在");


    // ==========矩阵====

    ErrorCode OPORG_MANAGER_DEFINE_NOT_EXISTS = new ErrorCode(2010000001, "岗位不存在");
    ErrorCode OPORG_MANAGER_MATRIX_NOT_EXISTS = new ErrorCode(2010000002, "矩阵ID不存在");
    ErrorCode OPORG_MANAGER_MATRIX_CONFIG_NOT_EXISTS = new ErrorCode(2010000003, "人员落位信息不存在");
    ErrorCode OPORG_MANAGER_DEFINE_CODE_EXISTS = new ErrorCode(2010000004, "编码已经存在");
    ErrorCode OPORG_MANAGER_DEFINE_NAME_EXISTS = new ErrorCode(2010000005, "名称已经存在");
    ErrorCode NOT_VILID_OPORG_MANAGER_MATRIX = new ErrorCode(2010000006, "没有有效的矩阵");


    ErrorCode BUSINESS_MANAGER_MATRIX_NOT_EXISTS = new ErrorCode(2011000001, "职能不存在");
    ErrorCode BUSINESS_MANAGER_MATRIX_CODE_EXISTS = new ErrorCode(2011000002, "编码已经存在");
    ErrorCode BUSINESS_MANAGER_MATRIX_NAME_EXISTS = new ErrorCode(2011000003, "名称已经存在");


}
